home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Commodities / Event! / Install Event! < prev    next >
Text File  |  1996-09-26  |  8KB  |  399 lines

  1. ; Install script for Event!)
  2.  
  3.  
  4. ;*********
  5. ; Strings
  6. ;*********
  7.  
  8.  
  9. (set #bad-kick
  10. (cat "You must be using Kickstart 2.04 or higher to install using this script!"
  11. ))
  12.  
  13. (set #which-language
  14. (cat     "\nWhich languages should be installed?\n"
  15.     "(English is automatically available)"
  16. ))
  17. (set #which-language-help
  18. (cat "\nThe Amiga can be operated in many different"
  19.       " languages. If you want Event! to use the same"
  20.      " language as the Amiga Workbench"
  21.       " then a catalog file must be copied to your"
  22.       " harddisk for each language supported.\n\n"
  23.       "To reduce the amount of space consumed by the"
  24.       " language files, you can select to have only the"
  25.       " files of specific languages copied.\n\n"
  26.       "Simply check the boxes of the languages you wish"
  27.       " to have available on your system.\n\n"
  28.       @askoptions-help
  29. ))
  30.  
  31. (set #tocopy
  32.     (cat "Files to copy:"
  33. ))
  34.  
  35. (set #copy-main "\n\n\n\n\nInstall the Event Scheduler?")
  36. (set #copy-main-help
  37. (cat "\nThis will install the Event! main program."
  38. ))
  39.  
  40. (set #copy-keyfile "\n\n\n\n\nInstall the keyfile for Event! ?\n(strongly advised ;) )")
  41. (set #copy-keyfile-help
  42. (cat "\nThis will install Event!'s keyfile,\n"
  43.      "which will disable the shareware\n"
  44.      "reminder at program startup."
  45. ))
  46.  
  47. (set #copy-cfg "\n\n\n\n\nInstall the default configuration?")
  48. (set #copy-cfg-help
  49. (cat "\nThis will install the default configuration."
  50. ))
  51.  
  52. (set #copy-tell "\n\n\n\n\nInstall the TellEvent! command?")
  53. (set #copy-tell-help
  54. (cat "\nThis will install the TellEvent! command.\n"
  55.      "TellEvent! can be used to send messages to the\n"
  56.      "ARexx-Port of Event!"
  57. ))
  58.  
  59. (set #copy-arexx "\nInstall supplied ARexx scripts?")
  60. (set #copy-arexx-help
  61. (cat "\nThis will install some example ARexx scripts "
  62.      "that are included in the Event! distribution."
  63. ))
  64.  
  65. (set #copy-arexx-spot "\nInstall ARexx scripts supporting Spot?")
  66. (set #copy-arexx-spot-help
  67. (cat "\nThis will install some example ARexx scripts\n"
  68.      "that are included in the Event! distribution for\n"
  69.      "use with Spot."
  70. ))
  71.  
  72. (set #copy-arexx-ced "\nInstall ARexx scripts supporting CygnusED?")
  73. (set #copy-arexx-ced-help
  74. (cat "\nThis will install an example ARexx script"
  75.      "that is included in the Event! distribution for use with CygnusED."
  76. ))
  77.  
  78. (set #install-msg
  79. (cat "Installation program for\n"
  80. "    ________________________________________________\n"
  81. "   (_______________________________________  ______/\n"
  82. "        _____ ___  ____ _____   __   __   / /  __   \n"
  83. "       / ____)| |  / / / ____) / |  / /  / /  / /   \n"
  84. "      / /__   | | / / / /__   /  ( / /  / /  / /    \n"
  85. "     / ___/   | |/ / / ___/  / /| ) /  / /  (_/     \n"
  86. "    / /__     | / / / /__   / / | |/  / /  _        \n"
  87. "   (_____)    (/_/ (_____) (_/  |_/  /_/  (_)       \n"
  88. " _______________________________________________    \n"
  89. "(______________________________________________/    \n\n"
  90. "The Event Scheduler for the Commodore Amiga\n"
  91. "©1992-94 by Stefan Hochmuth. All rights reserved."
  92. ))
  93.  
  94.  
  95. ;*******************************************
  96. ; make sure Kick 2.0 or higher is available
  97. ;*******************************************
  98.  
  99. (if (< (/ (getversion) 65536) 37)
  100. (
  101.     (abort #bad-kick)
  102. ))
  103.  
  104.  
  105. (message #install-msg)
  106.  
  107. (welcome)
  108.  
  109. (set addtouserstartup 0)
  110. (set addtowbstartup 0)
  111.  
  112. ;*****************
  113. ; Install Program
  114. ;*****************
  115. (if
  116.     (askbool
  117.         (prompt #copy-main)
  118.         (help #copy-main-help)
  119.         (default 1)
  120.     )
  121.     (
  122.         (set eventdest
  123.             (askdir
  124.                 (prompt "Please select a drawer for Event!:\n"
  125.                     "If the drawer is different from\n"
  126.                     "\"SYS:WBStartup\" Event! can optionally\n"
  127.                     "be added to \"s:user-startup\"."
  128.                 )
  129.                 (help @askdir-help)
  130.                 (default "SYS:WBStartup")
  131.                 (newpath)
  132.             )
  133.         )
  134.  
  135.         (copyfiles
  136.             (prompt "Installing Event!...")
  137.             (source "Event!")
  138.             (infos)
  139.             (noposition)
  140.             (help @copylib-help)
  141.             (dest eventdest)
  142.         )
  143.         
  144.         (if (= eventdest "SYS:WBStartup")
  145. ; set tooltype
  146. ; ------------
  147.             (
  148.                 (tooltype
  149.                     (dest (tackon eventdest "Event!"))
  150.                     (settooltype "CX_POPUP" "NO")
  151.                 )
  152.                 (set addtowbstartup 1)
  153.             )
  154. ; add to user-startup
  155. ; -------------------
  156.             (
  157.                 (set addtouserstartup 1)
  158.             )
  159.         )
  160.  
  161.     )
  162. )
  163.  
  164.  
  165. ; *****************************************
  166. ; Install the Keyfile for registered users
  167. ; *****************************************
  168.  
  169. (if (exists "event!.key")
  170.     (if
  171.         (askbool
  172.             (prompt #copy-keyfile)
  173.             (help #copy-keyfile-help)
  174.             (default 1)
  175.         )
  176.         (copyfiles
  177.             (help @copy-keyfile-help)
  178.             (prompt #tocopy) 
  179.             (source "Event!.key")
  180.             (dest "devs:")
  181.         )
  182.     )
  183. )
  184.  
  185.  
  186.  
  187. ; ******************************
  188. ; Install Default Configuration
  189. ; ******************************
  190.  
  191. (if (NOT (exists "s:event!.cfg"))
  192.     (if
  193.         (askbool
  194.             (prompt #copy-cfg)
  195.             (help #copy-cfg-help)
  196.             (default 1)
  197.         )
  198.         (
  199.             (set cfgdest (cat "s:"))
  200.     
  201.             (copyfiles
  202.                 (help @copyfiles-help)
  203.                 (prompt #tocopy) 
  204.                 (source "Event!.cfg")
  205.                 (dest cfgdest)
  206.                 (confirm)
  207.             )
  208.         )
  209.     )
  210. )    
  211.  
  212.  
  213. ;******************************
  214. ; Install TellEvent! - command
  215. ;******************************
  216.  
  217. (if
  218.     (askbool
  219.         (prompt #copy-tell)
  220.         (help #copy-tell-help)
  221.         (default 1)
  222.     )
  223.     (
  224.         (set telldest
  225.             (askdir
  226.                 (prompt "Please select a drawer for TellEvent!.")
  227.                 (help @askdir-help)
  228.                 (default "C:")
  229.                 (newpath)
  230.             )
  231.         )
  232.  
  233.         (copyfiles
  234.             (prompt "Installing TellEvent!...")
  235.             (source "Util/TellEvent!")
  236.             (help @copylib-help)
  237.             (dest telldest)
  238.         )
  239.  
  240.     )
  241. )
  242.  
  243.  
  244. ;***********************
  245. ; Install ARexx-Scripts
  246. ;***********************
  247.  
  248. (if
  249.     (askbool
  250.         (prompt #copy-arexx)
  251.         (help #copy-arexx-help)
  252.         (default 1)
  253.     )
  254.     (
  255.         (set rexxdest (cat "REXX:"))
  256.  
  257.         (copyfiles
  258.             (help @copyfiles-help)
  259.             (prompt #tocopy) 
  260.             (source "Rexx")
  261.             (dest RexxDest)
  262.             (pattern "#?.evt")
  263.             (confirm)
  264.         )
  265.     )
  266. )
  267. ;*****************************************
  268. ; Install ARexx-Scripts for use with Spot
  269. ;*****************************************
  270.  
  271. (if
  272.     (askbool
  273.         (prompt #copy-arexx-spot)
  274.         (help #copy-arexx-spot-help)
  275.         (default 1)
  276.     )
  277.  
  278.     (
  279.         (set rexxspotdest (cat "REXX:spot"))
  280.         (copyfiles
  281.             (help @copyfiles-help)
  282.             (prompt #tocopy) 
  283.             (source "Rexx")
  284.             (dest rexxspotdest)
  285.             (pattern "#?.spot")
  286.             (confirm)
  287.         )
  288.     )
  289. )
  290.  
  291. ;*****************************************
  292. ; Install ARexx-Scripts for use with CED
  293. ;*****************************************
  294.  
  295. (if
  296.     (askbool
  297.         (prompt #copy-arexx-ced)
  298.         (help #copy-arexx-ced-help)
  299.         (default 1)
  300.     )
  301.  
  302.     (
  303.         (set rexxceddest (cat "REXX:"))
  304.         (copyfiles
  305.             (help @copyfiles-help)
  306.             (source "Rexx")
  307.             (dest rexxceddest)
  308.             (pattern "#?.ced")
  309.             (prompt #tocopy) 
  310.             (confirm)
  311.         )
  312.     )
  313. )
  314.  
  315. ;*******************
  316. ; Install Languages
  317. ;*******************
  318.  
  319. (if (exists "libs:locale.library")
  320.             (copyfiles
  321.                 (help @copyfiles-help)
  322.                 (source "Catalogs")
  323.                 (dest "Locale:Catalogs")
  324.                 (all)
  325.                 (prompt #which-language) 
  326.                 (confirm average)
  327.             )
  328.  
  329. )
  330. ;***********************
  331. ; Install Documentation
  332. ;***********************
  333.  
  334. (set guidedest
  335.     (askdir
  336.         (prompt "Please select a drawer for Event!'s\n"
  337.             "AmigaGuide documentation:")
  338.         (help @askdir-help)
  339.         (default "SYS:Utilities/guides")
  340.         (newpath)
  341.     )
  342. )
  343.  
  344. (copyfiles
  345.     (prompt "Installing Documentation...")
  346.     (source "Docs/Event!.guide")
  347.     (infos)
  348.     (noposition)
  349.     (help @copylib-help)
  350.     (dest guidedest)
  351. )
  352.  
  353. (if addtowbstartup
  354.     (tooltype
  355.         (dest (tackon eventdest "Event!"))
  356.         (settooltype "GUIDE" (tackon guidedest "Event!.guide") )
  357.     )
  358. )
  359.  
  360. (if addtouserstartup
  361.     (
  362.         (set oldlevel @user-level)
  363.         (if (> oldlevel 0) 
  364.             (user 2)
  365.         )
  366.         (startup "Event!"
  367.             (command "run >NIL: \""
  368.                  (tackon eventdest "Event!")
  369.                  "\" CX_POPUP=NO GUIDE=\""
  370.                  (tackon guidedest "Event!.guide\"")
  371.             )
  372.                 (prompt (cat    "\n\n\n\nReady to add \"" 
  373.                     (tackon eventdest "Event!")
  374.                      "\" to s:user-startup?"
  375.                 )
  376.             )
  377.             (help @startup-help)
  378.         )
  379.         (user oldlevel)
  380.     )
  381. )
  382.  
  383.  
  384. (if (>= (/ (getversion) 65536) 39)
  385.     (tooltype
  386.         (dest (tackon guidedest "Event!.guide"))
  387.         (setdefaulttool "SYS:Utilities/MultiView")
  388.     )
  389.     (tooltype
  390.         (dest (tackon guidedest "Event!.guide"))
  391.         (setdefaulttool "SYS:Utilities/AmigaGuide")
  392.     )
  393. )
  394.  
  395.  
  396.  
  397. (set @default-dest eventdest)
  398.  
  399.